DECLARE FUNCTION HexWord$ (Number&)
DECLARE FUNCTION HexDigit$ (Number%)
DECLARE FUNCTION HexByte$ (Number%)
CONST StartAt = &H190
CLS
OPEN "e:\mlss" FOR INPUT AS 1
SEEK #1, StartAt: Pointer& = StartAt
DO WHILE (NOT EOF(1))
IF Pointer& MOD 16 = 0 THEN LPRINT : LPRINT HexWord(Pointer&); "  ";
a$ = INPUT$(1, 1)
Pointer& = Pointer& + 1
LPRINT HexByte(ASC(a$)); " ";
LOOP

FUNCTION HexByte$ (Number%)
HexByte$ = HexDigit(Number% \ 16) + HexDigit(Number% MOD 16)
END FUNCTION

FUNCTION HexDigit$ (Number%)
IF Number% > 9 THEN Number% = Number% + 7
HexDigit$ = CHR$(Number% + 48)
END FUNCTION

FUNCTION HexWord$ (ONumber&)
Number& = ONumber&
a$ = "0000"
FOR n% = 0 TO 3
MID$(a$, 4 - n%) = HexDigit(Number& MOD 16)
Number& = Number& \ 16
NEXT
HexWord$ = a$
END FUNCTION

